#include <iostream>
#include<windows.h>
#include<stdlib.h>
using namespace std;

const int n = 1200;
int main()
{

    cout << "Normal" << endl;
    //原始矩阵
    int** matrix = new int* [n];
    int m = 0;
    for (int i = 0; i < n; i++)
        matrix[i] = new int[n];
    for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++)
            matrix[i][j] = m++;

    //初始化记录和的数组
    int* sum = new int[n];
    for (int j = 0; j < n; j++)
        sum[j] = 0;

    //平凡算法求和计时
    long long head, tail, freq;
    QueryPerformanceFrequency((LARGE_INTEGER*)&freq);
    QueryPerformanceCounter((LARGE_INTEGER*)&head);

    for (int j = 0; j < n; j++)
        for (int i = 0; i < n; i++)
            sum[j] += matrix[i][j];
    QueryPerformanceCounter((LARGE_INTEGER*)&tail);
    cout << "平凡算法: " << (tail-head)*1000.0 / freq << "ms" << endl;
    return 0;
}